﻿using OA.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OA.BLL
{
    public class CKnowledge
    {
        public static void Map(List<SimpleKnowledge> list,List<SimpleKnowledgeGroup> listKnowledgeGroup) {

            foreach (SimpleKnowledge item in list)
            {
                SimpleKnowledgeGroup group = listKnowledgeGroup.Where(m => m.ID == item.GroupID).FirstOrDefault();
                if(group!=null)
                {
                    item.GroupName = group.Name;
                }
            }
        }
    }
}
